package wfmanage.action;

import java.util.List;
import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

import edu.wfmanage.models.Claim;
import edu.wfmanage.models.User;

public class financeHistory extends ActionSupport {
	private String userid;
	private List<Claim> financeHistory;
	public String execute() throws Exception {
		Map<String, Object> session = ActionContext.getContext().getSession();
		User user = (User) session.get("user");
		if (user == null) {
			user = new User();
		}		
		String sql="select * from request where (FINANCE_DPT_STATUS ='Approved' or FINANCE_DPT_STATUS ='Rejected')and FINANCE_APPROVAL_BY='"+user.getUsername() +"'";
		financeHistory=Claim.getHistory(sql);
		return "seeHistory";
	}
	public List<Claim> getFinanceHistory() {
		return financeHistory;
	}
	public void setFinanceHistory(List<Claim> financeHistory) {
		this.financeHistory = financeHistory;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
	
	
	
}
